package com.sccba.emtbusiness.service.impl;

import java.util.List;

import com.sccba.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sccba.emtbusiness.mapper.YjczEmergencyHandleProcessMapper;
import com.sccba.emtbusiness.domain.YjczEmergencyHandleProcess;
import com.sccba.emtbusiness.service.IYjczEmergencyHandleProcessService;

/**
 * 应急处置操作流程Service业务层处理
 * 
 * @author lichh
 * @date 2024-04-18
 */
@Service
public class YjczEmergencyHandleProcessServiceImpl implements IYjczEmergencyHandleProcessService 
{
    @Autowired
    private YjczEmergencyHandleProcessMapper yjczEmergencyHandleProcessMapper;

    /**
     * 查询应急处置操作流程
     * 
     * @param pkId 应急处置操作流程主键
     * @return 应急处置操作流程
     */
    @Override
    public YjczEmergencyHandleProcess selectYjczEmergencyHandleProcessByPkId(Long pkId)
    {
        return yjczEmergencyHandleProcessMapper.selectYjczEmergencyHandleProcessByPkId(pkId);
    }

    /**
     * 查询应急处置操作流程列表
     * 
     * @param yjczEmergencyHandleProcess 应急处置操作流程
     * @return 应急处置操作流程
     */
    @Override
    public List<YjczEmergencyHandleProcess> selectYjczEmergencyHandleProcessList(YjczEmergencyHandleProcess yjczEmergencyHandleProcess)
    {
        return yjczEmergencyHandleProcessMapper.selectYjczEmergencyHandleProcessList(yjczEmergencyHandleProcess);
    }

    /**
     * 新增应急处置操作流程
     * 
     * @param yjczEmergencyHandleProcess 应急处置操作流程
     * @return 结果
     */
    @Override
    public int insertYjczEmergencyHandleProcess(YjczEmergencyHandleProcess yjczEmergencyHandleProcess)
    {
        yjczEmergencyHandleProcess.setCreateTime(DateUtils.getNowDate());
        return yjczEmergencyHandleProcessMapper.insertYjczEmergencyHandleProcess(yjczEmergencyHandleProcess);
    }

    /**
     * 修改应急处置操作流程
     * 
     * @param yjczEmergencyHandleProcess 应急处置操作流程
     * @return 结果
     */
    @Override
    public int updateYjczEmergencyHandleProcess(YjczEmergencyHandleProcess yjczEmergencyHandleProcess)
    {
        yjczEmergencyHandleProcess.setUpdateTime(DateUtils.getNowDate());
        return yjczEmergencyHandleProcessMapper.updateYjczEmergencyHandleProcess(yjczEmergencyHandleProcess);
    }

    /**
     * 批量删除应急处置操作流程
     * 
     * @param pkIds 需要删除的应急处置操作流程主键
     * @return 结果
     */
    @Override
    public int deleteYjczEmergencyHandleProcessByPkIds(Long[] pkIds)
    {
        return yjczEmergencyHandleProcessMapper.deleteYjczEmergencyHandleProcessByPkIds(pkIds);
    }

    /**
     * 删除应急处置操作流程信息
     * 
     * @param pkId 应急处置操作流程主键
     * @return 结果
     */
    @Override
    public int deleteYjczEmergencyHandleProcessByPkId(Long pkId)
    {
        return yjczEmergencyHandleProcessMapper.deleteYjczEmergencyHandleProcessByPkId(pkId);
    }

    @Override
    public void batchInsert(List<YjczEmergencyHandleProcess> processList) {
        yjczEmergencyHandleProcessMapper.batchInsert(processList);
    }

    @Override
    public void batchUpdate(List<YjczEmergencyHandleProcess> processList) {
        yjczEmergencyHandleProcessMapper.batchUpdate(processList);
    }

    @Override
    public void batchDelete(List<Long> pkIds) {
        yjczEmergencyHandleProcessMapper.batchDelete(pkIds);
    }

    @Override
    public List<YjczEmergencyHandleProcess> getListByFbChannelAndScene(Long fbId, Long channelId, Long sceneId) {
        return yjczEmergencyHandleProcessMapper.getListByFbChannelAndScene(fbId, channelId, sceneId);
    }

    @Override
    public List<YjczEmergencyHandleProcess> selectProcessTemplateBySceneId(Long sceneId) {
        return yjczEmergencyHandleProcessMapper.selectProcessTemplateBySceneId(sceneId);
    }


}
